package com.ctsi.ssdc.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.ctsi.ssdc.annotation.AutoId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.ZonedDateTime;

/**
 * @author ctsi-biyi-generator
*/
@ApiModel(description = "LitemallCouponUser")
@TableName("litemall_coupon_user")
public class LitemallCouponUser extends Model<LitemallCouponUser> implements Serializable {
    /**
     * @Fields id 
     */
    @ApiModelProperty("")
    @AutoId(primaryKey = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value="id")
    @TableField(value="id")
    private Integer id;

    /**
     * @Fields userId 用户ID
     */
    @ApiModelProperty("userId")
    @TableField(value="user_id")
    private Integer userId;

    /**
     * @Fields couponId 优惠券ID
     */
    @ApiModelProperty("couponId")
    @TableField(value="coupon_id")
    private Integer couponId;

    /**
     * @Fields status 使用状态, 如果是0则未使用；如果是1则已使用；如果是2则已过期；如果是3则已经下架；
     */
    @ApiModelProperty("status")
    @TableField(value="status")
    private Short status;

    /**
     * @Fields usedTime 使用时间
     */
    @ApiModelProperty("usedTime")
    @TableField(value="used_time")
    private ZonedDateTime usedTime;

    /**
     * @Fields startTime 有效期开始时间
     */
    @ApiModelProperty("startTime")
    @TableField(value="start_time")
    private ZonedDateTime startTime;

    /**
     * @Fields endTime 有效期截至时间
     */
    @ApiModelProperty("endTime")
    @TableField(value="end_time")
    private ZonedDateTime endTime;

    /**
     * @Fields orderId 订单ID
     */
    @ApiModelProperty("orderId")
    @TableField(value="order_id")
    private Integer orderId;

    /**
     * @Fields addTime 创建时间
     */
    @ApiModelProperty("addTime")
    @TableField(value="add_time")
    private ZonedDateTime addTime;

    /**
     * @Fields updateTime 更新时间
     */
    @ApiModelProperty("updateTime")
    @TableField(value="update_time")
    private ZonedDateTime updateTime;

    /**
     * @Fields deleted 逻辑删除
     */
    @ApiModelProperty("deleted")
    @TableField(value="deleted")
    private Boolean deleted;

    private static final long serialVersionUID = 1L;

    /** 
     * @return id 
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /** 
     * @return user_id 用户ID
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * @param userId 用户ID
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /** 
     * @return coupon_id 优惠券ID
     */
    public Integer getCouponId() {
        return couponId;
    }

    /**
     * @param couponId 优惠券ID
     */
    public void setCouponId(Integer couponId) {
        this.couponId = couponId;
    }

    /** 
     * @return status 使用状态, 如果是0则未使用；如果是1则已使用；如果是2则已过期；如果是3则已经下架；
     */
    public Short getStatus() {
        return status;
    }

    /**
     * @param status 使用状态, 如果是0则未使用；如果是1则已使用；如果是2则已过期；如果是3则已经下架；
     */
    public void setStatus(Short status) {
        this.status = status;
    }

    /** 
     * @return used_time 使用时间
     */
    public ZonedDateTime getUsedTime() {
        return usedTime;
    }

    /**
     * @param usedTime 使用时间
     */
    public void setUsedTime(ZonedDateTime usedTime) {
        this.usedTime = usedTime;
    }

    /** 
     * @return start_time 有效期开始时间
     */
    public ZonedDateTime getStartTime() {
        return startTime;
    }

    /**
     * @param startTime 有效期开始时间
     */
    public void setStartTime(ZonedDateTime startTime) {
        this.startTime = startTime;
    }

    /** 
     * @return end_time 有效期截至时间
     */
    public ZonedDateTime getEndTime() {
        return endTime;
    }

    /**
     * @param endTime 有效期截至时间
     */
    public void setEndTime(ZonedDateTime endTime) {
        this.endTime = endTime;
    }

    /** 
     * @return order_id 订单ID
     */
    public Integer getOrderId() {
        return orderId;
    }

    /**
     * @param orderId 订单ID
     */
    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    /** 
     * @return add_time 创建时间
     */
    public ZonedDateTime getAddTime() {
        return addTime;
    }

    /**
     * @param addTime 创建时间
     */
    public void setAddTime(ZonedDateTime addTime) {
        this.addTime = addTime;
    }

    /** 
     * @return update_time 更新时间
     */
    public ZonedDateTime getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime 更新时间
     */
    public void setUpdateTime(ZonedDateTime updateTime) {
        this.updateTime = updateTime;
    }

    /** 
     * @return deleted 逻辑删除
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * @param deleted 逻辑删除
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LitemallCouponUser other = (LitemallCouponUser) that;
        return (this.getId() == null ? other.getId() == null :
				 this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null :
				 this.getUserId().equals(other.getUserId()))
            && (this.getCouponId() == null ? other.getCouponId() == null :
				 this.getCouponId().equals(other.getCouponId()))
            && (this.getStatus() == null ? other.getStatus() == null :
				 this.getStatus().equals(other.getStatus()))
            && (this.getUsedTime() == null ? other.getUsedTime() == null :
				 this.getUsedTime().equals(other.getUsedTime()))
            && (this.getStartTime() == null ? other.getStartTime() == null :
				 this.getStartTime().equals(other.getStartTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null :
				 this.getEndTime().equals(other.getEndTime()))
            && (this.getOrderId() == null ? other.getOrderId() == null :
				 this.getOrderId().equals(other.getOrderId()))
            && (this.getAddTime() == null ? other.getAddTime() == null :
				 this.getAddTime().equals(other.getAddTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null :
				 this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleted() == null ? other.getDeleted() == null :
				 this.getDeleted().equals(other.getDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getUsedTime() == null) ? 0 : getUsedTime().hashCode());
        result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        return result;
    }
}